﻿#region Using

using System;
using Vk.Methods.Common;

#endregion

namespace Vk.Methods.Photos
{
    public class PhotoEntryShort : BaseEntity
    {
        public int? AlbumId;
        public DateTime? DateCreated;
        public bool Extended;
        public string Url;
        public string UrlBig;
        public string UrlSmall;

        public PhotoEntryShort(ApiNode node)
        {
            Id = node.Int("pid");
            AlbumId = node.Int("aid");
            OwnerId = node.Int("owner_id");
            Url = node.String("src");
            UrlBig = node.String("src_big");
            UrlSmall = node.String("src_small");
            DateCreated = node.DateTime("created");
        }

        public override string ToString()
        {
            return AlbumId + "_" + Id;
        }
    }

    public class PhotoEntryShortExtended : PhotoEntryShort
    {
        public LikesInfo LikesInfo;

        public PhotoEntryShortExtended(ApiNode node) : base(node)
        {
            LikesInfo = new LikesInfo(node.SelectNode("likes"));
            Extended = true;
        }
    }
}